﻿<Page
    x:Name="pageRoot"
    x:Class="CodeShow.CS.CodeShowPage"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CodeShow.CS"
    xmlns:common="using:CodeShow.CS.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Foreground="Black">

    <Page.Resources>

    </Page.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid Background="{StaticResource CodeShowBackgroundThemeBrush}">
        <Grid.ChildrenTransitions>
            <TransitionCollection>
                <EntranceThemeTransition/>
            </TransitionCollection>
        </Grid.ChildrenTransitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!-- Back button and page title -->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" Margin="39,59,39,0" Command="{Binding NavigationHelper.GoBackCommand, ElementName=pageRoot}"
                        Style="{StaticResource NavigationBackButtonNormalStyle}"
                        Foreground="Black"
                        VerticalAlignment="Top"
                        AutomationProperties.Name="Back"
                        AutomationProperties.AutomationId="BackButton"
                        AutomationProperties.ItemType="Navigation Button" />
            <Grid  Grid.Column="1" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>

                <TextBlock 
                    Grid.Column="0" 
                    x:Name="pageTitle" 
                    Style="{StaticResource HeaderTextBlockStyle}"
                    IsHitTestVisible="false"
                    TextWrapping="NoWrap" 
                    VerticalAlignment="Bottom"
                    HorizontalAlignment="Right"
                    Margin="0,0,30,40"/>
                <Button
                    Grid.Column="1"
                    x:Name="CodeViewButton"
                    Height="60" 
                    VerticalAlignment="Bottom"
                    HorizontalAlignment="Left"
                    Content="see the code"
                    Foreground="Gray"
                    FontWeight="Light"
                    BorderThickness="0"
                    Tapped="Button_Tapped"
                    FontSize="30"
                    Margin="-30,0,0,20"/>
                <HyperlinkButton
                    Grid.Column="2"
                    x:Name="sampleLink" 
                    Content="MSDN Sample &#xE111;" 
                    Height="60"
                    FontSize="30"
                    Foreground="Blue" 
                    FontWeight="Light"
                    FontFamily="Segoe UI Symbol"
                    VerticalAlignment="Bottom"
                    HorizontalAlignment="Right"
                    Margin="30,0,0,20"
                    NavigateUri="http://msdn.microsoft.com/en-us" />
            </Grid>
        </Grid>
        <ScrollViewer Grid.Row="1" Grid.Column="1" HorizontalScrollMode="Enabled" HorizontalScrollBarVisibility="Auto">
            <Grid x:Name="detailGrid">
            </Grid>
        </ScrollViewer>
    </Grid>
</Page>
